//
//  SEGiKeyManager.h
//  Uhomebk
//
//  Created by Chiang on 2018/3/2.
//  Copyright © 2018年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <LopeKit/LopeKit.h>
#import "SEGOpenDoorBaseAPI.h"
#import <CoreBluetooth/CoreBluetooth.h>

@protocol SEGiKeyDelegate <NSObject>

@optional
/**
 * 开门结果
 * success:YES,开门成功，NO，开门失败
 * message:开门失败时，返回具体的错误信息
 **/
- (void)openDoorResult:(BOOL)success errorCode:(NPDErrorCode)code;

@end

@interface SEGiKeyManager : SEGOpenDoorBaseAPI<NPDSophKeyDelegate>
 
@property (nonatomic, copy) NSString *key; //开门秘钥
@property (nonatomic, copy) NSString *macAddress; //设备Mac地址

/**
 * 返回单例对象
 * @return 返回单例对象
 */
+ (instancetype)sharedIkey;

@end
